import 'package:flutter/material.dart';

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  Widget rowText(String text) {
    Widget body = Text(
      text,
      style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
    );

    body = Center(child: body);
    body = Container(
        width: double.infinity,
        height: 40,
        margin: const EdgeInsets.only(top: 10),
        color: Colors.blueGrey,
        child: body);

    return body;
  }

  List<Widget> get rowTextList => [
        rowText('HomePage1'),
        rowText('HomePage2'),
        rowText('HomePage3'),
        rowText('HomePage4'),
        rowText('HomePage5'),
        rowText('HomePage6'),
        rowText('HomePage7'),
        rowText('HomePage8'),
        rowText('HomePage9'),
        rowText('HomePage10'),
        rowText('HomePage11'),
        rowText('HomePage12'),
        rowText('HomePage13'),
        rowText('HomePage14'),
        rowText('HomePage15'),
        rowText('HomePage16'),
        rowText('HomePage17'),
        rowText('HomePage18'),
        rowText('HomePage19'),
        rowText('HomePage20'),
      ];

  Widget body() {
    Widget body = Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: rowTextList,
    );
    body = ListView(children: rowTextList);
    return body;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(body: body());
  }
}
